﻿using System;

class GreatestOfFive
{
    static void Main()
    {
        //Write a program that finds the greatest of given 5 variables.

        Console.WriteLine("Enter five variables.");
        Console.Write("Enter first variable: ");
        int firstNumber = int.Parse(Console.ReadLine());
        Console.Write("Enter second variable: ");
        int secondNumber = int.Parse(Console.ReadLine());
        Console.Write("Enter third variable: ");
        int thirdNumber = int.Parse(Console.ReadLine());
        Console.Write("Enter fourth variable: ");
        int fourthNumber = int.Parse(Console.ReadLine());
        Console.Write("Enter fifth variable: ");
        int fifthNumber = int.Parse(Console.ReadLine());

        if ((firstNumber > secondNumber) && (firstNumber > thirdNumber) && (firstNumber > fourthNumber) && (firstNumber > fifthNumber))
        {
            Console.WriteLine("The greatest variable is first");
        }
        else if ((secondNumber > firstNumber) && (secondNumber > thirdNumber) && (secondNumber > fourthNumber) && (secondNumber > fifthNumber))
        {
            Console.WriteLine("The gratest variable is second");
        }
        else if ((thirdNumber > firstNumber) && (thirdNumber > secondNumber) && (thirdNumber > fourthNumber) && (thirdNumber > fifthNumber))
        {
            Console.WriteLine("The gratest variable is third");
        }
        else if ((fourthNumber > firstNumber) && (fourthNumber > secondNumber) && (fourthNumber > thirdNumber) && (fourthNumber > fifthNumber))
        {
            Console.WriteLine("The gratest variable is fourth");
        }
        else if ((fifthNumber > firstNumber) && (fifthNumber > secondNumber) && (fifthNumber > thirdNumber) && (fifthNumber > fourthNumber))
        {
            Console.WriteLine("The gratest variable is fifth");
        }
    }
}

